define(
		[ "PDUtilDir/grid", "PDUtilDir/searchBlock", "PDUtilDir/slidebar" ],
		function(Grid, SearchBlock, Slidebar) {

			function init(cache, searchObj, detailObj) {
				SearchBlock.init('searchBlockId');
				var supplerOrgType = '',
					strObj = {
					update : '<a href="javascript:angular.element(\'#MyAusoInfoGirdDivId\').scope().updateSupport.run',
					update_suffix : '">修改</a>',

				}, getStr = function(oper, id) {
					return strObj[oper] + '(\'' + id + '\')' + strObj[oper + '_suffix'];
				};
				// 初始化
				return Grid({
					id : "MyAusoInfoGirdDivId",
					pageSize : 10,
					index : true,
					multi : true,
					pagination : true,
					cache : false,
					layout : [
							{
								name : "订单号",
								field : "serverOrderNo",
								sort : false,
                                width: '210px',
								click : function(e) {
									detailObj.run(e.data.row.id);
								}
							},
							{
								name : "申请方",
								field : "applerOrgName",
								sort : true
							},
							{
								name : "审核方",
								field : "receiverOrgName",
								sort : true
							},
							{
								name : "申请人",
								field : "applerName",
								sort : true
							},
							{
								name : "申请人电话",
								field : "applerPhone",
								sort : true
							},
							// {
							// 	name : "申请原因",
							// 	field : "applerReason",
							// 	sort : true
							// },
							{
								name : "状态",
								field : "status",
								format : function(e) {
									return cache.statusMap.get(e.row.status);
								}
							},
							{
								name : "创建时间",
                                width: '160px',
								field : "createTime"
							},
							{
								name : "操作",
								field : "createTime",
								sort : false,
								format : function(e) {
									var str = '', data = e.row, id = data.id, status = data.status;
									// 同意修改
									if (status == "D_SERVICE_ORDER_APPLY_UPDATE_STATUE_AGR" && data.type == "D_SERVICE_ORDER_APPLY_UPDATE_UPDATE_PRODUCT") {
										str = getStr('update', id) + str;
									}
									return str;
								}
							} ],
					toolbar : [{
						name : "查询",
						icon : "fa fa-search",
						callback : function(event) {
							searchObj.run();
						}
					}],
					data : {
						type : 'URL',
						value : getServer() + '/flea/hclv/serviceOrder/listApplerUpdateApply.htmls'
					}
				});
			}
			return {
				init : init
			}
		});